package com.ruoyi.fengkong.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.fengkong.entity.TFkBusinessCredit;
import com.ruoyi.fengkong.mapper.TFkBusinessCreditMapper;
import com.ruoyi.fengkong.service.ITFkBusinessCreditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 风控公寓授信主Service业务层处理
 * 
 * @author wish
 * @date 2021-06-19
 */
@Service
public class TFkBusinessCreditServiceImpl implements ITFkBusinessCreditService
{
    @Autowired
    private TFkBusinessCreditMapper tFkBusinessCreditMapper;

    /**
     * 查询风控公寓授信主
     * 
     * @param id 风控公寓授信主ID
     * @return 风控公寓授信主
     */
    @Override
    public TFkBusinessCredit selectTFkBusinessCreditById(Long id)
    {
        return tFkBusinessCreditMapper.selectTFkBusinessCreditById(id);
    }

    /**
     * 查询风控公寓授信主列表
     * 
     * @param tFkBusinessCredit 风控公寓授信主
     * @return 风控公寓授信主
     */
//    @Override
//    public List<TFkBusinessCredit> selectTFkBusinessCreditList(TFkBusinessCredit tFkBusinessCredit)
//    {
//        return tFkBusinessCreditMapper.selectTFkBusinessCreditList(tFkBusinessCredit);
//    }

    /**
     * 新增风控公寓授信主
     * 
     * @param tFkBusinessCredit 风控公寓授信主
     * @return 结果
     */
    @Override
    public int insertTFkBusinessCredit(TFkBusinessCredit tFkBusinessCredit)
    {
        tFkBusinessCredit.setCreateTime(DateUtils.getNowDate());
        return tFkBusinessCreditMapper.insertTFkBusinessCredit(tFkBusinessCredit);
    }

    /**
     * 修改风控公寓授信主
     * 
     * @param tFkBusinessCredit 风控公寓授信主
     * @return 结果
     */
    @Override
    public int updateTFkBusinessCredit(TFkBusinessCredit tFkBusinessCredit)
    {
        tFkBusinessCredit.setUpdateTime(DateUtils.getNowDate());
        return tFkBusinessCreditMapper.updateTFkBusinessCredit(tFkBusinessCredit);
    }

    /**
     * 批量删除风控公寓授信主
     * 
     * @param ids 需要删除的风控公寓授信主ID
     * @return 结果
     */
    @Override
    public int deleteTFkBusinessCreditByIds(Long[] ids)
    {
        return tFkBusinessCreditMapper.deleteTFkBusinessCreditByIds(ids);
    }

    /**
     * 删除风控公寓授信主信息
     * 
     * @param id 风控公寓授信主ID
     * @return 结果
     */
    @Override
    public int deleteTFkBusinessCreditById(Long id)
    {
        return tFkBusinessCreditMapper.deleteTFkBusinessCreditById(id);
    }

    @Override
    public List<TFkBusinessCredit> selectTFkBusinessCreditList(TFkBusinessCredit tFkBusinessCredit) {
        return tFkBusinessCreditMapper.selectTFkBusinessCreditList(tFkBusinessCredit);
    }
}
